Skip to content

Fix contributor index switch button label white space preservation - #2762

Open
richardebeling wants to merge 1 commit into
e-valuation:mainfrom
richardebeling:contributor-index-btn-switch-label-breaking
Open

Fix contributor index switch button label white space preservation#2762
richardebeling wants to merge 1 commit into
e-valuation:mainfrom
richardebeling:contributor-index-btn-switch-label-breaking

Conversation

@richardebeling

Copy link
Copy Markdown
Member

In #2736, we introduced additional in-html whitespace in the switch button label on the contributor index page. However, in #2054, we added the classes text-break break-spaces to the button label, which applies this CSS:

.break-spaces {
    white-space: break-spaces;
}

Now, this unintuitively does not mean "break my text at whitespaces". It also preserves original breaking whitespaces (aka newlines). So, the two newlines our formatting added are also included in the div, causing the switch button to look like this:
image

I think we should get rid of this break-spaces class since it does not do what people would expect it to do. To still make our text wrap here, I discussed with @janno42 and we agreed that we should probably just allow text wrapping in .btn-switch-label.

@niklasmohrin niklasmohrin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Student vote looks worse now:

Before: Image

After: Image

@niklasmohrin

Copy link
Copy Markdown
Member

semester view also has this, which is more functional than before, but also funny:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants